﻿@model WB.UI.WebTester.Controllers.InterviewPageModel
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section scripts {
    <script>
        window.CONFIG.hqLink = "null";
        window.CONFIG.splashScreen = true;
    </script>
    
    <img style="padding: 10px 20px;" src="/img/loading.gif" alt="loading..." />
}
@section footer{
    <script>
        function checkStatus() {
            var xhr = new XMLHttpRequest();
            xhr.onreadystatechange = function() {
                if (xhr.readyState == XMLHttpRequest.DONE) {
                    if (xhr.responseText != "Loading")
                        document.location.reload(true);
                    else
                        setTimeout(function() { checkStatus() }, 3 * 1000);
                }
            }
            xhr.open('GET', '@Url.Action("GetStatus", "WebTester", new {id = Model?.Id})', true);
            xhr.send(null);
        }
    
        checkStatus();
    </script>
}
